]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
FdoNotifications: Don't use a fallback for no icon
authorJulian Sparber <julian@sparber.net>
Wed, 6 Dec 2023 19:48:43 +0000 (20:48 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 30 Jan 2024 17:05:23 +0000 (17:05 +0000)
There is no need to have an icon for every notification, don't add a
fallback.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>

js/ui/notificationDaemon.js

index d9eed69ba1224324c78584489120565e1ed72bb5..8a7a59889c40c719fc94bbfb7d525804de9d9e9a 100644 (file)
@@ -61,20 +61,6 @@ class FdoNotificationDaemon {
         return null;
     }
 
-    _fallbackIconForNotificationData(hints) {
-        let stockIcon;
-        switch (hints.urgency) {
-        case Urgency.LOW:
-        case Urgency.NORMAL:
-            stockIcon = 'dialog-information';
-            break;
-        case Urgency.CRITICAL:
-            stockIcon = 'dialog-error';
-            break;
-        }
-        return new Gio.ThemedIcon({name: stockIcon});
-    }
-
     _iconForNotificationData(icon) {
         if (icon) {
             if (icon.substr(0, 7) === 'file://')
@@ -212,10 +198,7 @@ class FdoNotificationDaemon {
             });
         }
 
-        let gicon = this._imageForNotificationData(hints);
-
-        if (!gicon)
-            gicon = this._fallbackIconForNotificationData(hints);
+        const gicon = this._imageForNotificationData(hints);
 
         const soundFile = 'sound-file' in hints
             ? Gio.File.new_for_path(hints['sound-file']) : null;